]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensionSystem: Catch errors when removing extension update
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 23 May 2025 20:15:13 +0000 (22:15 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 24 May 2025 13:47:07 +0000 (15:47 +0200)
We want to remove the temporary folder independently from whether the
update succeeded or failed, so we currently remove it from a `finally`
statement. Unfortunately that operation can fail as well, in which
case we don't catch it and the exception interferes with startup.

Fix this by removing the folder in a separate catch statement instead.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8417
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3721>

js/ui/extensionSystem.js

index f12ee07a334ec8de1233a9f5cd69c82410c101ca..4f253f04eba9e59e6e071c18e0861aa1cc00b06f 100644 (file)
@@ -669,8 +669,12 @@ export class ExtensionManager extends Signals.EventEmitter {
                 FileUtils.recursivelyMoveDir(dir, extensionDir);
             } catch {
                 log(`Failed to install extension updates for ${uuid}`);
-            } finally {
+            }
+
+            try {
                 FileUtils.recursivelyDeleteDir(dir, true);
+            } catch (e) {
+                console.error(`Failed to delete extension update: ${e.message}`);
             }
         }
     }